<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="./../template/WorkspaceTemplate.xhtml">

    <ui:define name="top">
        
    </ui:define>

    <ui:define name="left">
    </ui:define>

    <ui:define name="right">
   
    </ui:define>

    <ui:define name="content">
        <h:form>
            <p:panel id="panel" header="View All Order Discount">
                <br/>
                <p:dataTable  styleClass="allaroundborder" value="#{odgManagerBean.viewAllOrderDiscount()}" var="odg"
                              paginator="true" rows="20">

                    <f:facet name="header">  
                        List of Order Discount Group
                    </f:facet>
                    
                    <p:column sortBy="#{odg.product.productType}" filterBy="#{odg.product.productType}">
                        <f:facet name="header">
                            <h:outputText value="Product Type" />
                        </f:facet>
                        <h:outputText value="#{odg.product.productType}" />
                    </p:column>
                    
                    <p:column sortBy="#{odg.quantity}" filterBy="#{odg.quantity}">
                        <f:facet name="header">
                            <h:outputText value="Quantity" />
                        </f:facet>
                        <h:outputText value="#{odg.quantity}" />
                    </p:column>
                    
                    <p:column sortBy="#{odg.orderDiscount}" filterBy="#{odg.orderDiscount}">
                        <f:facet name="header">
                            <h:outputText value="Discount" />
                        </f:facet>
                        <h:outputText value="#{odg.orderDiscount}" />
                    </p:column>

                </p:dataTable>
            </p:panel>
        </h:form>
    </ui:define>

    <ui:define name="bottom">
       
    </ui:define>

</ui:composition>
